<?php $this->load->view('header'); ?>

<!-- Page Content -->
<div id="search-project">
	<?php echo $this->load->view('sideBlocks/searchBlock') ?>
</div>
<div class="wrap-content wrap-project">
    <div class="container">
        <div class="row find-freelance">
                <div class="col-md-3 find-freelancer-left">
                    <div class="form-group col-lg-12 no-padding">
                        <label for="exampleInputEmail1"><?php echo $this->lang->line("Groups")?></label>
                        <select class="form-control sl-group col-lg-12 chzn-select">
                        	<option>-- Please select --</option>
                        	<?php 
								foreach($groupCategories as $item){
                        	?>
                            <option value="<?php echo $item['group_id']?>"><?php echo $item['group_name']?></option>
                            <?php }?>
                        </select>
                    </div>
                    <div class="form-group col-lg-12 no-padding">
                        <label for="exampleInputEmail1"><?php echo $this->lang->line("Skills")?></label>
                        <input type="hidden" id="href_current" value="">
                        <div class="div-skill">
	                        <select class="form-control sl-skill col-lg-12 chzn-select">
	                        	<option>-- Please select --</option>
	                        </select>
                        </div>
                        <?php if(isset($categories_selected) && $categories_selected->num_rows() >0 ){?>
                        <ul class="list-skill-freelancer">
                        	<?php 
                        	foreach($categories_selected->result() as $item){
								$arrIds = explode(',',$category_ids);
								$category_id = array_diff($arrIds, array($item->id));
								$link = site_url('users/findFreelancer/0/'.implode(',',$category_id));
							?>
                            <li>
                            	<i class="clip-close-3"></i>
                                <a href="<?php echo $link;?>"><?php echo $item->category_name;?></a>
                            </li>
                            <?php }?>
                        </ul>
                        <?php }?>
                    </div>
                </div>
                <div class="col-lg-9 col-md-12 col-xs-12">
                    <div class="freelancer-pagination-rate row">
                        <div class="freelancer-pagination col-lg-9 col-md-9 col-sm-9">
                            <?php echo $pagination;?>
                        </div> <!-- freelancer pagination -->
                        <div class="freelancer-rate col-lg-3 col-md-3 col-sm-3">
                                <div class="btn-group">
                                    <button type="button" class="btn btn-default dropdown-toggle btn-action" data-toggle="dropdown">
                                     Action <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu" role="menu">
                                            <li><a href="#">Action</a></li>
                                            <li><a href="#">Another action</a></li>
                                            <li><a href="#">Something else here</a></li>
                                            <li class="divider"></li>
                                            <li><a href="#">Separated link</a></li>
                                    </ul>
                                </div>
                        </div> <!-- reelancer rate -->
                    </div> <!-- freelancer-pagination-rate -->

                    <?php
                        foreach ($data as $value) {
                    ?>
                        <div class="item-freelancer row">
	                        <div class="col-lg-3 col-md-3 col-sm-3 img-item-freelancer">
	                            <a href="<?php echo site_url('programmer/viewProfile/'.$value['id']);?>">
	                                <img title="<?php echo $value['user_name']?>" alt="<?php echo $value['user_name']?>" class="img-responsive" src="<?php if($value['logo'] !='') echo uimage_url($value['logo']); else echo image_default();?>">
	                            </a>
	                        </div> <!-- img-item-freelancer -->
	                        <div class="col-lg-9 col-md-9 col-sm-9 no-padding detail-item-freelancer">
	                            <div class="name-item-freelancer no-padding col-lg-8 col-sm-8 col-md-8">
	                            	<a href="<?php echo site_url('programmer/viewProfile/'.$value['id']);?>">
	                                <?php echo $value['user_name'];?>
	                                </a>
	                            </div> <!-- name-item-freelancer -->
	                            <div class="btn-join-freelancer col-lg-4 col-sm-4 col-md-4">
	                                <button type="button" class="btn btn-invite" data-href="<?php echo site_url("userList/inviteProgrammer/".$value['id'])?>"><?php echo $this->lang->line("invite")?></button>
	                            </div> <!-- btn-join-freelancer -->
	                            <div class="rating-freelancer col-lg-7 col-sm-7 col-md-7 col-xs-12 no-padding">
	                                <input id="input-21e2" value="<?php echo $value['user_rating']?>" type="number" data-star-captions="{}" data-default-caption="{rating}" class="rating" min=0 max=5  data-size="xs" disabled="disabled">
	                            </div> <!-- rating-freelancer -->
	                            
	                            <div class="skill-freelancer no-padding col-lg-12 col-sm-12 col-md-12">

	                                <?php echo $this->lang->line("Skills")?> : <?php echo getCategoryLinks($value['user_categories']);?>

	                            </div> <!-- skill-freelancer -->
	                            <div class="desc-freelancer no-padding col-lg-12 col-sm-12 col-md-12">
	                                <?php echo $value['profile_desc'];?> 
	                            </div> <!-- desc-freelancer -->
	                        </div> <!-- detail-item-freelancer -->
                    	</div> <!-- item-freelancer -->
                    	<div class="border-item"></div>   
                    <?php
                        }
                    ?>                
                    
                    <div class="freelancer-pagination-rate-last row">
                        <div class="freelancer-pagination col-lg-9 col-md-9 col-sm-9">
                            <?php echo $pagination;?>
                        </div> <!-- freelancer pagination -->
                        <div class="freelancer-rate col-lg-3 col-md-3 col-sm-3">
                                <div class="btn-group">
                                    <button type="button" class="btn btn-default dropdown-toggle btn-action" data-toggle="dropdown">
                                     Action <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu" role="menu">
                                            <li><a href="#">Action</a></li>
                                            <li><a href="#">Another action</a></li>
                                            <li><a href="#">Something else here</a></li>
                                            <li class="divider"></li>
                                            <li><a href="#">Separated link</a></li>
                                    </ul>
                                </div>
                        </div> <!-- reelancer rate -->
                    </div>
                </div>
        </div> <!-- end row content -->
    </div>
</div> <!-- wrap-content -->
 
<?php $this->load->view('footer'); ?>